/**
 * 配置
 * */
package org.zmhhxl.api.auth.domain.entity.mapper;

/**
 * Role结构映射
 *
 * @author felord.cn
 * @since 1.0.0
 */
//@Mapper(componentModel = MappingConstants.ComponentModel.SPRING,
//      imports = {CollectionUtils.class},
//      unmappedTargetPolicy = ReportingPolicy.IGNORE,  //忽略未映射的属性,另外，WARN，警告。ERROR，报错
//      unmappedSourcePolicy = ReportingPolicy.IGNORE,  //忽略未映射的属性 另外，WARN，警告。ERROR，报错
//      nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS  //空值检查
//      //uses = {UserInfoMapper.class}   //使用其他手动编写的或者其他Mapper接口覆写相关的转换方法，不能循环引用
//
//)
//public interface RoleMapper {
//
//   /**
//    * To entity role.
//    *
//    * @param roleDTO the role dto
//    * @return the role
//    */
//   @Mapping(target = "userInfos", ignore = true)
//   //@Mapping(target = "permissions", ignore = true),
//   // @Mapping(target = "parent", ignore = true),
//   // @Mapping(target = "children", ignore = true),
//   @Mapping(target = "id", source = "id")
//   @Mapping(target = "roleName", source = "roleName")
//   @Mapping(target = "enabled", source = "enabled")
//   @Mapping(target = "roleCode", source = "roleCode")
//   @Mapping(target = "roleContent", source = "roleContent")
//   Role toEntity(RoleDTO roleDTO);
//
//          /**
//           * Merge.
//           *
//           * @param source the source
//           * @param target the target
//          */
//          @BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
//          @Mappings(value = {
//                //@Mapping(target = "permissions", ignore = true),
//                @Mapping(target = "userInfos", ignore = true),
//               // @Mapping(target = "parent", ignore = true),
//              //  @Mapping(target = "children", ignore = true),
//              //  @Mapping(target = "roleId", source = "roleId"),
//              //  @Mapping(target = "parentId", source = "parentId"),
//                @Mapping(target = "enabled", source = "enabled"),
//                @Mapping(target = "roleCode", source = "roleCode"),
//                @Mapping(target = "roleContent", source = "roleContent"),
//              //  @Mapping(target = "createTime", ignore = true),
//              //  @Mapping(target = "updateTime", ignore = true),
//                @Mapping(target = "roleName", ignore = true),
//                // @Mapping())
//                })
//      void mergeAndIgnorePermissions(Role source, @MappingTarget Role target);
//}
